package com.zy.openchat.core.model.circle;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class BlogLikeInfo implements Parcelable {

    @SerializedName(value = "@type")
    public String type;
    public int total_count;
    public List<BlogUserDateInfo> user_dates;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.type);
        dest.writeInt(this.total_count);
        dest.writeTypedList(this.user_dates);
    }

    public void readFromParcel(Parcel source) {
        this.type = source.readString();
        this.total_count = source.readInt();
        this.user_dates = source.createTypedArrayList(BlogUserDateInfo.CREATOR);
    }

    public BlogLikeInfo() {
    }

    protected BlogLikeInfo(Parcel in) {
        this.type = in.readString();
        this.total_count = in.readInt();
        this.user_dates = in.createTypedArrayList(BlogUserDateInfo.CREATOR);
    }

    public static final Creator<BlogLikeInfo> CREATOR = new Creator<BlogLikeInfo>() {
        @Override
        public BlogLikeInfo createFromParcel(Parcel source) {
            return new BlogLikeInfo(source);
        }

        @Override
        public BlogLikeInfo[] newArray(int size) {
            return new BlogLikeInfo[size];
        }
    };
}
